package top.wshape1.shiziapi.common.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @author Wshape1
 * @version 1.0
 * @description
 * @since 2023-09-20
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class MessageVo implements Serializable {

    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    private Long userId;

    private String title;

    private String content;

    private Integer type;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date sendTime;

    @JsonProperty("isRead")
    private boolean isRead;

    @JsonProperty("isBroadcast")
    private boolean isBroadcast;


}
